1. Field of the Invention
The present invention relates to an on-vehicle electronic control unit that carries out, for example, fuel supply control of an automobile engine, open/close control of an air supply throttle valve or control of a transmission and, more particularly, to an on-vehicle electronic control unit being arranged so as to improve power failure hold control of a RAM memory in which a variety of learning data calculated by a microprocessor, so as to make use of a part of flash memory used as a program memory of the microprocessor as a non-volatile data memory, and to increase the number of times of rewriting this data memory.
2. Description of the Related Art
Generally, an conventional on-vehicle electronic control unit is formed of a program memory in which control programs and control constants for a controlled vehicle type are stored from an external tool and of a microprocessor provided with an operation processing RAM memory. The conventional on-vehicle electronic control unit is fed with an electric power from an on-vehicle battery when a power supply switch is brought in a closed circuit to control an on-vehicle current consumer group in response to input signals from on-vehicle sensor groups, a content of the mentioned program memory, and a content of control constants having been transferred from the mentioned program memory to the RAM memory. In this conventional on-vehicle electronic control unit, a part of control constants in the mentioned RAM memory is processed as variable control constants to be rewritten and altered as a learning compensation result. Accordingly, the following arts have been widely put into practical use. That is, this conventional on-vehicle electronic control unit is provided with a non-volatile data memory such as EEPROM capable of being electrically written, and various learning data, vehicle inherent information, analysis and maintenance information or the like are written in this data memory and utilized as effective driving control information or diagnosis information by the external tools.
For example, it is described in “On-Vehicle Control Unit” disclosed in the Japanese Patent Publication (unexamined) No, 182607/2001 that an object of the invention is to eliminate influences due to change with the passage of time or individual difference in control targets. To accomplish the object, a microprocessor cooperating with a mask ROM, in which control programs are stored, copes with the interruption of battery wiring or the abnormal decrease of battery voltage by estimating control results in the past (control history) to calculate a learning data for correction of a control parameter or a control theory and by transferring this learning data from the RAM memory to the non-volatile EEPROM memory. Especially, this prior art describes about improvement against the possibility that a power supply switch is accidentally interrupted on the way of the learned data being saved and written from the RAM memory to the EEPROM memory.
Oh the other hand, instead of the mentioned non-volatile EEPROM memory, the use of a mass storage of non-volatile flash memory is carried out, in which data can be written after batch clear. For example, it is described in “Processing Unit” disclosed in the Japanese Patent Publication (unexamined) No. 244707/1997 that, in an engine control unit (ECU), a content of a RAM memory in which learning values are written is transferred and saved in a non-volatile flash memory every predetermined time period, thereby reducing the number of times of write in the flash memory.
Furthermore, according to “Data Storage Method to Flash Memory and Data Read Method from Flash Memory” disclosed in the Japanese Patent Publication (unexamined) No. 259046/1997, the following data storage method to a flash memory and data read method from a flash memory are proposed. In the methods, a region plural times as large as a record functioning as a minimum unit of write is batch clear, and thereafter data are sequentially written in this region for each record at the time of writing a predetermined amount of data, thus providing a method capable of reducing the number of times of erase and achieving longer operation life of the memory.
In the mentioned known arts, in the case of the Japanese Patent Publication (unexamined) No. 182607/2001, an EEPROM memory is employed as a non-volatile data memory, and in this EEPROM memory data can be freely written with a unit of 1 byte, and available number of times of rewriting can be relatively large through the operation life of the EEPROM memory. However, a problem exists in a small capacity of memory, thus coming high in cost.
Whereas, as for a flash memory disclosed in the Japanese Patent Publication (unexamined) No. 244707/1997, it is certain that a larger capacity of memory is achieved. However, this flash memory is a memory coming to be writable after batch clear has been executed. Although a memory capacity is large and designed to diminish the number of times of write, a problem still exists in a smaller number of times capable of executing batch clear through the operation life.
It is certain that the Japanese Patent Publication (unexamined) No. 259046/1997 can solve a problem of operation life incidental to the Japanese Patent Publication (unexamined) No. 244707/1997. However, in the case of the Japanese Patent Publication (unexamined) No. 259046/1997, a program memory ROM, a RAM memory for operation processing, and a flash memory as a non-volatile data memory with respect to a microprocessor are used, and therefore it is essential to use three types of memories appropriately, thus remaining problems of being complicated, expensive, and large-scaled.